home *** CD-ROM | disk | FTP | other *** search
- /******** OBJECTS.C Copyright 1992 Gregory Colvin *********
- This program may be distributed free with this notice.
- ***********************************************************/
-
- #include <assert.h>
- #include <string.h>
- #include "objects.h"
-
- #ifndef __cplusplus /* Not C++, assume C */
-
- /* Object Stack: */
- static Object *ObjectStack[MAX_PUSH];
- Object * near *pThis = ObjectStack + MAX_PUSH;
-
-
- /* Object Class definition: */
-
- void Object_destroy(void)
- {
- GET_THIS_SAFE(Object);
- }
-
- int Object_isA(const char *className)
- { int result = !strcmp("Object",className);
- return result;
- }
-
- void Object_construct(void)
- {
- }
-
- void Object_destruct(void)
- {
- }
-
- ObjectMethods ObjectTable;
-
- void ObjectInitClass(void)
- {
- if (ObjectTable.initialized)
- return;
- ObjectTable.name = "Object";
- ObjectTable.initialized = 1;
- DEF_METHOD(Object,destroy);
- DEF_METHOD(Object,isA);
- }
-
- #else /* C++ */
-
- const char *Object::classname()
- { return "Object";
- }
-
- int Object::isA(const char *className)
- { return !strcmp("Object",className);
- }
-
-
- #endif /* C vs. C++ */
-